import { http } from '@/utils/request'

// 获取分销商品列表
export function getDistributionGoods(params: any) {
  return http.request({
    url: '/distribution/goods',
    method: 'GET',
    params,
  })
}

// 取消分销商品
export function distributionGoodsCancel(id: number | string) {
  return http.request({
    url: `/distribution/goods/cancel/${id}`,
    method: 'DELETE',
  })
}

// 选择分销商品
export function distributionGoodsCheck(id: number | string, params: any) {
  return http.request({
    url: `/distribution/goods/checked/${id}`,
    method: 'PUT',
    params,
  })
}

// 获取分销订单列表
export function getDistributionOrder(params: any) {
  return http.request({
    url: '/distribution/order',
    method: 'GET',
    params,
  })
}
